<?php

 /**
  * @package JooS
  * @subpackage CodeGenerator_File
  */

  require_once "JooS/CodeGenerator/File/Adapter.php";

  class JooS_CodeGenerator_File_Adapter_File extends JooS_CodeGenerator_File_Adapter {
    /**
     * @var string
     */
    private $_name = null;

    /**
     * @param string $name
     * @return JooS_CodeGenerator_File_Adapter_File
     */
    public function set_name($name) {
      if (!file_exists($name))
        self::throwException("File '$name' not found");

      $this->_name = $name;
      return $this;
    }

    /**
     * @return string
     */
    public function get_name() {
      if ($this->_name === null)
        self::throwException("File name must be initialized before use");
      return $this->_name;
    }
  }
